<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglib.jsp" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<title>添加站点</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=7" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<style type="text/css">
			#addForm label.error {
				font-size: 12px;
				color: red;
			}
		</style>
		<script type="text/javascript" src="<%=path%>/js/ui.js"></script>
		<link id="editCss" rel="stylesheet" type="text/css"href="<%=path%>/css/style.css" />
		<link id="editCss" rel="stylesheet" type="text/css"href="<%=path%>/css/right.css" />
		<script src="<%=path%>/js/jquery.js" type="text/javascript"></script>
		<script src="<%=path%>/js/jquery.validate.js" type="text/javascript"></script>
		<!-- validate begin  -->
		<script type="text/javascript">
			function isBlock(foo) {
				var listExpre = document.getElementById("list_expre");
				var articleExpre = document.getElementById("article_expre");
				var dateExpre = document.getElementById("date_expre");
				var datePattern = document.getElementById("date_pattern");
				if(foo) {
					listExpre.style.display = "";
					articleExpre.style.display = "";
					dateExpre.style.display = "";
					datePattern.style.display = "";
				} else {
					listExpre.style.display = "none";
					articleExpre.style.display = "none";
					dateExpre.style.display = "none";
					datePattern.style.display = "none";
				}
			}
		
		</script>
	</head>
	<body class="bg">
		<div id="nav" class="crumbs">
			当前位置：
			<a href="<%=path%>/zebra/monitor/module/moduleAction" class="title">网站管理 </a>&gt; 添加网站
		</div>
		<div class="search ctitle">
			<div class="tab">
				<span class="right"></span>
				<span class="font-blue14pxb">添加站点</span>
			</div>
		</div>
		<div class="tableBox fwidth">
			<form id="addForm" method="post" action="<%=path%>/zebra/monitor/module/moduleAction">
				<input type="hidden" name="method" id="method" value="add" />
				<input type="hidden" name="parentId" id="parentId" value="${parentId}" />
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="text_left" colspan="2">名称</td>
						<td class="text_left" colspan="2">
							<input name="name" id="name" type="text" maxlength="255" value=""/>
						</td>
					</tr>
					<tr>
						<td class="text_left" colspan="2">路径</td>
						<td class="text_left" colspan="2">
							<input name="path" id="path" type="text" value=""/>
						</td>
					</tr>
					<tr>
						<td class="text_left" colspan="2">是否监控</td>
						<td class="text_left" colspan="2">
							是<input name="isMonitor" type="radio" value="1" checked="checked" /> 
							| 否<input name="isMonitor" type="radio" value="0"/>
						</td>
					</tr>
					<tr>
						<td class="text_left" colspan="2">是否为文章列表</td>
						<td class="text_left" colspan="2">
							是<input name="isList" type="radio" value="1" onclick="isBlock(true)"/> 
							| 否<input name="isList" type="radio" value="0" checked="checked" onclick="isBlock(false)"/>
						</td>
					</tr>
					<tr id="list_expre" style="display:none;">
						<td class="text_left" colspan="2">列表采集表达式</td>
						<td class="text_left" colspan="2">
							<input name="listPageExpre" id="listPageExpre" type="text" maxlength="500" value=""/>
							<a class="button" target="_blank" href="<%=path%>/zebra/monitor/module/help.jsp">帮助</a>
						</td>
					</tr>
					<tr id="article_expre" style="display:none;">
						<td class="text_left" colspan="2">文章采集表达式</td>
						<td class="text_left" colspan="2">
							<input name="articleListExpre" id="articleListExpre" type="text" maxlength="500" value=""/> 
							<a class="button" target="_blank" href="<%=path%>/zebra/monitor/module/help.jsp">帮助</a>
						</td>
					</tr>
					<tr id="date_pattern" style="display:none;">
						<td class="text_left" colspan="2">时间格式</td>
						<td class="text_left" colspan="2">
							<input name="datePattern" id="datePattern" type="text" maxlength="500" value=""/>
							<a class="button" target="_blank" href="<%=path%>/zebra/monitor/module/help.jsp">帮助</a>
						</td>
					</tr>
					<tr id="date_expre" style="display:none;">
						<td class="text_left" colspan="2">时间采集表达式</td>
						<td class="text_left" colspan="2">
							<input name="dateExpre" id="dateExpre" type="text" maxlength="500" value=""/> 
							<a class="button" target="_blank" href="<%=path%>/zebra/monitor/module/help.jsp">帮助</a>
						</td>
					</tr>
					<tr>
						<td class="text_left" colspan="2">描述</td>
						<td class="text_left" colspan="2">
							<input name="discription" id="discription" type="text" maxlength="500" value=""/>
						</td>
					</tr>
					<tr class="footer">
						<td colspan="4" align="center" >
							<input type="submit" name="save" value="添 加" class="button" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>
